package com.huluobo.h3weekdemo.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.huluobo.h3weekdemo.main.NewsBean

/**
 *  Created by LC on 2023/11/1.
 */
@Dao
interface NewsDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertNews(newsBean: NewsBean)

    @Update
    fun updateNews(newsBean: NewsBean)

    @Delete
    fun deleteNews(newsBean: NewsBean)

    @Query("select * from news_info")
    fun queryNews(): List<NewsBean>
}